package com.mbc.common.entities;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;

@SuppressWarnings("serial")
@Entity
@NamedQueries({
	@NamedQuery(name="UserInBranches.findByUserId", query="SELECT ub FROM UserInBranches ub WHERE ub.userId = :userId"),
	@NamedQuery(name="UserInBranches.deleteByUserId", query="DELETE FROM UserInBranches ub WHERE ub.userId = :userId")
})
public class UserInBranches implements Serializable {

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private long autoKey;
	@Basic(optional=false)
	private long userId;
	@Basic(optional=false)
	private long branchId;


	public UserInBranches(){
	}

	public long getAutoKey() {
		return autoKey;
	}

	public void setAutoKey(long autoKey) {
		this.autoKey = autoKey;
	}

	public long getUserId() {
		return userId;
	}

	public void setUserId(long userId) {
		this.userId = userId;
	}

	public long getBranchId() {
		return branchId;
	}

	public void setBranchId(long officeId) {
		this.branchId = officeId;
	}
}
